<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">
    <title>Sandy Disaster Response -- Request Map</title>
    <link href="/stylesheets/default.css?v={{version}}" rel="stylesheet">
    <link href="/stylesheets/form.css?v={{version}}" rel="stylesheet">
    <link href="/closure/css/dialog.css?v={{version}}" rel="stylesheet">
{% if uncompiled %}
    <script src="/closure/goog/base.js?v={{version}}"></script>
    <script src="/javascript/deps.js?v={{version}}"></script>
    <script type="text/javascript">
    goog.require("sandy.{% if demo %}demo{% else %}main{% endif %}");
    </script>
{% else %}
    <script src="/javascript/compiled_{% if demo %}demo{% else %}main{% endif %}.js?v={{version}}"></script>
{% endif %}
<script src="/javascript/markerclusterer_packed.js?v={{version}}"></script>
{% if in_prod %}
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCv5oq0DwffOWKYK_tZBbOFguIcL22eF3c&v=3.exp&sensor=false"></script>
{% else %}
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
{% endif %}
<script type="text/javascript">
var my_organization ="{% if org %}{{org.name}}{% endif %}";
var STATUS_CHOICES = [
{% for status in status_choices %}{{status}},
{% endfor %}
];
var counties = [
{% for county in counties %}
  "{{county}}",{% endfor %}
];

var site_id = {% if site_id %}{{site_id}}{% else %}null{% endif %};

var zoom_level = {% if site_id %}{{zoom_level}}{% else %}null{% endif %};

</script>
  </head>
  <body onload="sandy.{% if demo %}demo{% else %}main{% endif %}.initialize(site_id, zoom_level)"><div id="container" style="width:100%;height:100%">

{{ logout }}
<div id="map_canvas"></div>
<div id="filtersbackground">
<div id="filters">
    Only show the following types:<br />
{% for f in filters %}
<input type="checkbox" onclick="sandy.map.Refilter()" name="filter" id="{{f[0]}}">
<label for="{{f[0]}}">{{f[1]}}</label><br />
{% endfor %}
<br />
<form method="POST" action="/print" target="_blank">
<input name="id" class="id_list" type="hidden" value="" />
<input type="submit" id="filtered_print" value="Get Printable Version"></input><br />
</form>
<form method="POST" action="/export" target="_blank">
<input name="id" class="id_list" type="hidden" value="" />
<input type="submit" id="filtered_export" value="Download as Spreadsheet (CSV)"></input><br />
</form>
</div></div>
<div id="info">
</div>
<div id="legend_div">
<img id="legend_img" src="/icons/Legend.png" />
</div>
</div>

<div id="form_background" style="display: none; z-index: 12;">
<div id="form">
<form id="edit_form" method="POST" action="{{page}}">
<input type="button" value="Save changes" onclick="sandy.main.SaveEdit()" />
<input type="button" value="Cancel" onclick="sandy.main.CloseEdit()" />
<div id="single_site">
</div>
<input type="button" value="Save changes" onclick="sandy.main.SaveEdit()" />
<input type="button" value="Cancel" onclick="sandy.main.CloseEdit()" />
</form>
</div>
</div>  {# form_background #}
 </body>
</html>
